/*
 * G2P_PronunStruct.h
 *
 *  Created on: Nov 21, 2012
 *      Author: bannok
 */

#ifndef G2P_PRONUNSTRUCT_H_
#define G2P_PRONUNSTRUCT_H_

#include <stdio.h>
#include <stdlib.h>
typedef struct _struc_unit{
	char prefix;
	unsigned int  number;
}struc_unit;
typedef struct _struc_tri_unit{
	int st1;
	int st2;
}struc_tri_unit;
typedef struct _pronun_struct_unit{
	unsigned int st1;
	unsigned int st2;
	int c1;
	int c2;
	int wt1;
	int wt2;
	int t1;
	int t2;
	int sound;
}pronun_struct_unit;
typedef struct _pronun_struct{
	pronun_struct_unit **st;	//sturcture data
	int st_unit;				//amount of structure
	unsigned int *tri_phone;
	int len;
	int sound;
}pronun_struct;

int pronun_struct_make_binary(const char * input,const char * output);
int pronun_struct_load_binary(const char* input);
pronun_struct * pronun_struct_find(int index);
void pronun_struct_print(pronun_struct * st);
void pronun_sturct_num2phone(char * text,int num,int tone);
void pronun_sturct_num2phonetic(char * text, int num,int tone);

#endif /* G2P_PRONUNSTRUCT_H_ */
